local qingguo = fk.CreateSkill {
  name = "cpt11__qingguo",
}

Fk:loadTranslationTable{
    ["cpt11__qingguo"] = "倾国",
    ["#cpt11__qingguo"] = "倾国：你可以将装备区的一张牌当【闪】使用或打出。",
    [":cpt11__qingguo"] = "你可以将一张装备区的一张牌当【闪】使用或打出。",

    ["$cpt11__qingguo1"] = "凌波微步，罗袜生尘。",
    ["$cpt11__qingguo2"] = "体迅飞凫，飘忽若神。",
}

qingguo:addEffect("viewas", {
  anim_type = "defensive",
  pattern = "jink|.|spade,club",
  prompt = "#cpt11__qingguo",
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and table.contains(player:getCardIds("e"), to_select)
  end,
  view_as = function(self, player, cards)
    if #cards ~= 1 then return end
    local c = Fk:cloneCard("jink")
    c.skillName = qingguo.name
    c:addSubcard(cards[1])
    return c
  end,
})

qingguo:addAI(nil, "vs_skill")

return qingguo